<template>
    <!--服务热线-->
    <div class="hotLine">
        <div class="search">
            <aui-search placeholder="搜索" @change="handleChange" default-value=""></aui-search>
        </div>
        <div v-for="(item,index) in datas.hotLineList" :key="index" class="listItem">
            <div class="title">
                <div class="name">{{ item.title }}</div>
                <div class="desc">{{ item.subTitle }}</div>
            </div>
            <div v-for="(itemphone,index) in item.phones" :key="index" class="phone">
                {{ itemphone }}
            </div>
            <div class="content">{{ item.content }}</div>
        </div>
    </div>
</template>
<script>
//mock数据真实服务注释删除
import datas from '../../mock/servehotline/servehotline'
export default {
    data() {
        return {
            value: '',
            datas
        };  
    },
    created() {
        window.HWH5.setNavigationBarTitle({ title: this.datas.navTitle });
        // 真实请求服务方法
        // const userId = this.$store.state.userInfo.userId
        // this.getDatas(userId)
    },
    methods: {
        // 搜索列表数据
        handleChange(obj, val) {
            this.value = val;
        },
        // 获取服务热线接口数据
        // getDatas(userId) {
        //   真实接口服务请求 需要将userInfo中的id作为参数传进去做数据请求
        //   const url = 'https://xxx?userId' + userId;
        //   const _headers = {
        //     'Content-Type': 'application/json'
        //   };
        //   HWH5.fetchInternet(url, {
        //     method: 'get',
        //     headers: _headers
        //   })
        //     .then(res => {
        //       res.json().then(reply => {
        //           //将接口返回数据赋值给热服务
        //           this.datas = reply
        //       });
        //     })
        //     .catch(error => {
        //       console.log('请求异常', error);
        //     });
        // }
    }
}
</script>
<style lang="less" scoped>
    .hotLine {
        .search {
            box-sizing: border-box;
            padding:6px 0px;
        }
        .listItem {
            background:#fff;
            margin-bottom: 8px;
            .title {
                height:67px;
                padding: 10px 16px;
                box-sizing: border-box;
                border-bottom:1px solid #e8e8e8;
                .name {
                    font-family: PingFangSC-Regular;
                    font-size: 17px;
                    color: #000000;
                    letter-spacing: 0;
                }
                .desc {
                    font-family: PingFangSC-Regular;
                    font-size: 12px;
                    color: #999999;
                }
            }
            .phone {
                margin:8px 16px 0 8px;
                font-family: PingFangSC-Regular;
                font-size: 16px;
                color: #0D94FF;
                letter-spacing: 0;
                box-sizing: border-box;
            }
            .content {
                padding: 12px 16px;
                font-family: PingFangSC-Regular;
                font-size: 12px;
                color: #666666;
                letter-spacing: 0;
            }
        }
    }
</style>